import request from '@/utils/request'
/**
 * 列表
 * @returns
 */
export function GetListAPI (params) {

    return request({
        url: '/system/mould/list',
        method: 'GET',
        params
    })
}



/**
 * 
 * @param {*} data 
 * 新增
 */
export function AddDataAPI (data) {
    return request({
        url: '/system/mould/add',
        method: 'POST',
        data
    })
}
/**
 * 回显
 */
export function GetViewAPI (data) {
    return request({
        url: '/system/mould/view/' + data,
        method: 'GET',


    })
}
/**
 * 类别回显
 */
export function GetCategoryViewAPI (data) {
    return request({
        url: '/system/moldCategory/view/' + data,
        method: 'GET',


    })
}

/**
 * 修改
 * @param {*} data 
 * @returns 
 */
export function EditDataAPI (data) {
    return request({
        url: '/system/mould/edit',
        method: 'PUT',
        data
    })
}
/**
 * 类别
 * @param {*} data 
 * @returns 
 */
export function EditCategoryDataAPI (data) {
    return request({
        url: '/system/moldCategory/edit',
        method: 'PUT',
        data
    })
}
// 删除
export function DelDataAPI (data) {
    return request({
        url: '/system/mould/remove/' + data,
        method: 'DELETE'
    })
}
/**
 * 
 * @param {} data 
 * @returns 禁用启用
 */
export function editStatusAPI (data) {
    return request({
        url: '/pureut-equipment/alarmSetting/editStatus',
        method: 'PUT',
        data
    })
}
/**
 * 类别树结构
 */
export function TreeListAPI () {
    return request({
        url: '/system/moldCategory/list',
        method: 'GET',
    })
}

/**
 * 一级树结构
 */
export function moldDdlAPI () {
    return request({
        url: '/system/moldCategory/ddl',
        method: 'GET',
    })
}
/**
 * 类别保存
 */
export function AddCategoryAPI (data) {
    return request({
        url: '/system/moldCategory/add',
        method: 'POST',
        data
    })
}
/**
 * 
 * @param {} data 
 * @returns 删除
 */
export function DelCategoryAPI (data) {
    return request({
        url: '/system/moldCategory/' + data,
        method: 'DELETE'
    })
}
